package com.share.shareplatform.shareorder.service;



import com.share.shareplatform.pojo.Goods;
import com.share.shareplatform.pojo.Order;
import com.share.shareplatform.pojo.exception.LogicException;

import java.util.List;

public interface OrderService {
    Long addOne(Order order);
    Integer updateOne(Order order);
    Integer deleteOneById(Long id);
    Integer deleteAllByIds(Long[] ids);
    Integer deleteAllSafeByIds(List<Long> ids) throws LogicException;
    Order findOneById(Long id);
    List<Order> findAllByUserId(Long id);
    List<Order> findAllByUserIdAndState(Long id,String state);
    List<Order> findAllByUserIdAndType(Long id,String type);

    Integer updatePayOrders(List<Order> orderList) throws LogicException;
    Integer globalUpdateAllPaymentStateByIds(List<Long> orderList) throws LogicException;
    List<Order> findAllByGoodsList(Long id, List<Goods> goods);
    List<Order> findAllById(List<Long> list);
}
